package com.tanklab.signature.eth.contract;

import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import org.web3j.abi.TypeReference;
import org.web3j.abi.datatypes.Function;
import org.web3j.abi.datatypes.Type;
import org.web3j.abi.datatypes.Utf8String;
import org.web3j.abi.datatypes.generated.Bytes32;
import org.web3j.abi.datatypes.generated.Uint256;
import org.web3j.crypto.Credentials;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.RemoteCall;
import org.web3j.protocol.core.RemoteFunctionCall;
import org.web3j.protocol.core.methods.response.TransactionReceipt;
import org.web3j.tuples.generated.Tuple10;
import org.web3j.tuples.generated.Tuple2;
import org.web3j.tx.Contract;
import org.web3j.tx.TransactionManager;
import org.web3j.tx.gas.ContractGasProvider;

/**
 * <p>Auto generated code.
 * <p><strong>Do not modify!</strong>
 * <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
 * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the 
 * <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
 *
 * <p>Generated with web3j version 5.0.0.
 */
@SuppressWarnings("rawtypes")
public class Internal extends Contract {
    public static final String BINARY = "608060405234801561001057600080fd5b5061185b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806338fbba1f14610046578063a3eeb51914610077578063b65dbe94146100b0575b600080fd5b610060600480360381019061005b9190610dcb565b6100cc565b60405161006e929190610eac565b60405180910390f35b610091600480360381019061008c9190610dcb565b61048e565b6040516100a79a99989796959493929190610ef5565b60405180910390f35b6100ca60048036038101906100c59190610fe0565b6107a0565b005b60606000806000846040516100e191906111a3565b90815260200160405180910390206040518061014001604052908160008201548152602001600182018054610115906111e9565b80601f0160208091040260200160405190810160405280929190818152602001828054610141906111e9565b801561018e5780601f106101635761010080835404028352916020019161018e565b820191906000526020600020905b81548152906001019060200180831161017157829003601f168201915b505050505081526020016002820180546101a7906111e9565b80601f01602080910402602001604051908101604052809291908181526020018280546101d3906111e9565b80156102205780601f106101f557610100808354040283529160200191610220565b820191906000526020600020905b81548152906001019060200180831161020357829003601f168201915b50505050508152602001600382018054610239906111e9565b80601f0160208091040260200160405190810160405280929190818152602001828054610265906111e9565b80156102b25780601f10610287576101008083540402835291602001916102b2565b820191906000526020600020905b81548152906001019060200180831161029557829003601f168201915b505050505081526020016004820180546102cb906111e9565b80601f01602080910402602001604051908101604052809291908181526020018280546102f7906111e9565b80156103445780601f1061031957610100808354040283529160200191610344565b820191906000526020600020905b81548152906001019060200180831161032757829003601f168201915b505050505081526020016005820154815260200160068201548152602001600782018054610371906111e9565b80601f016020809104026020016040519081016040528092919081815260200182805461039d906111e9565b80156103ea5780601f106103bf576101008083540402835291602001916103ea565b820191906000526020600020905b8154815290600101906020018083116103cd57829003601f168201915b5050505050815260200160088201548152602001600982015481525050905061041681600001516108f1565b81602001518260400151836060015184608001516104378660a001516108f1565b6104448760c001516108f1565b8760e001516104578961010001516108f1565b60405160200161046f99989796959493929190611266565b6040516020818303038152906040528161012001519250925050915091565b6000818051602081018201805184825260208301602085012081835280955050505050506000915090508060000154908060010180546104cd906111e9565b80601f01602080910402602001604051908101604052809291908181526020018280546104f9906111e9565b80156105465780601f1061051b57610100808354040283529160200191610546565b820191906000526020600020905b81548152906001019060200180831161052957829003601f168201915b50505050509080600201805461055b906111e9565b80601f0160208091040260200160405190810160405280929190818152602001828054610587906111e9565b80156105d45780601f106105a9576101008083540402835291602001916105d4565b820191906000526020600020905b8154815290600101906020018083116105b757829003601f168201915b5050505050908060030180546105e9906111e9565b80601f0160208091040260200160405190810160405280929190818152602001828054610615906111e9565b80156106625780601f1061063757610100808354040283529160200191610662565b820191906000526020600020905b81548152906001019060200180831161064557829003601f168201915b505050505090806004018054610677906111e9565b80601f01602080910402602001604051908101604052809291908181526020018280546106a3906111e9565b80156106f05780601f106106c5576101008083540402835291602001916106f0565b820191906000526020600020905b8154815290600101906020018083116106d357829003601f168201915b505050505090806005015490806006015490806007018054610711906111e9565b80601f016020809104026020016040519081016040528092919081815260200182805461073d906111e9565b801561078a5780601f1061075f5761010080835404028352916020019161078a565b820191906000526020600020905b81548152906001019060200180831161076d57829003601f168201915b505050505090806008015490806009015490508a565b60008989898989898989896040516020016107c39998979695949392919061135e565b6040516020818303038152906040528051906020012090506040518061014001604052808b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281525060008c60405161083191906111a3565b908152602001604051809103902060008201518160000155602082015181600101908161085e9190611599565b5060408201518160020190816108749190611599565b50606082015181600301908161088a9190611599565b5060808201518160040190816108a09190611599565b5060a0820151816005015560c0820151816006015560e08201518160070190816108ca9190611599565b50610100820151816008015561012082015181600901559050505050505050505050505050565b606060008203610938576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061097c565b5b6000821461097b576000600a83610950919061169a565b9050600a8361095f91906116fa565b925061097361096d82610981565b83610adb565b915050610939565b5b919050565b606060006040518060400160405280601081526020017f303132333435363738396162636465660000000000000000000000000000000081525090506000836040516020016109d0919061172b565b60405160208183030381529060405290506000600167ffffffffffffffff8111156109fe576109fd610ca0565b5b6040519080825280601f01601f191660200182016040528015610a305781602001600182028036833780820191505090505b509050600060018351610a439190611746565b905083600f60f81b848381518110610a5e57610a5d61177a565b5b602001015160f81c60f81b1660f81c60ff1681518110610a8157610a8061177a565b5b602001015160f81c60f81b82600081518110610aa057610a9f61177a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081945050505050919050565b606060008390506000839050600081518351610af791906117a9565b67ffffffffffffffff811115610b1057610b0f610ca0565b5b6040519080825280601f01601f191660200182016040528015610b425781602001600182028036833780820191505090505b50905060008190506000805b8551811015610bd657858181518110610b6a57610b6961177a565b5b602001015160f81c60f81b838380610b81906117dd565b945081518110610b9457610b9361177a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610bce906117dd565b915050610b4e565b5060005b8451811015610c6257848181518110610bf657610bf561177a565b5b602001015160f81c60f81b838380610c0d906117dd565b945081518110610c2057610c1f61177a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610c5a906117dd565b915050610bda565b50829550505050505092915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610cd882610c8f565b810181811067ffffffffffffffff82111715610cf757610cf6610ca0565b5b80604052505050565b6000610d0a610c71565b9050610d168282610ccf565b919050565b600067ffffffffffffffff821115610d3657610d35610ca0565b5b610d3f82610c8f565b9050602081019050919050565b82818337600083830152505050565b6000610d6e610d6984610d1b565b610d00565b905082815260208101848484011115610d8a57610d89610c8a565b5b610d95848285610d4c565b509392505050565b600082601f830112610db257610db1610c85565b5b8135610dc2848260208601610d5b565b91505092915050565b600060208284031215610de157610de0610c7b565b5b600082013567ffffffffffffffff811115610dff57610dfe610c80565b5b610e0b84828501610d9d565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610e4e578082015181840152602081019050610e33565b60008484015250505050565b6000610e6582610e14565b610e6f8185610e1f565b9350610e7f818560208601610e30565b610e8881610c8f565b840191505092915050565b6000819050919050565b610ea681610e93565b82525050565b60006040820190508181036000830152610ec68185610e5a565b9050610ed56020830184610e9d565b9392505050565b6000819050919050565b610eef81610edc565b82525050565b600061014082019050610f0b600083018d610ee6565b8181036020830152610f1d818c610e5a565b90508181036040830152610f31818b610e5a565b90508181036060830152610f45818a610e5a565b90508181036080830152610f598189610e5a565b9050610f6860a0830188610ee6565b610f7560c0830187610ee6565b81810360e0830152610f878186610e5a565b9050610f97610100830185610ee6565b610fa5610120830184610e9d565b9b9a5050505050505050505050565b610fbd81610edc565b8114610fc857600080fd5b50565b600081359050610fda81610fb4565b92915050565b6000806000806000806000806000806101408b8d03121561100457611003610c7b565b5b60008b013567ffffffffffffffff81111561102257611021610c80565b5b61102e8d828e01610d9d565b9a5050602061103f8d828e01610fcb565b99505060408b013567ffffffffffffffff8111156110605761105f610c80565b5b61106c8d828e01610d9d565b98505060608b013567ffffffffffffffff81111561108d5761108c610c80565b5b6110998d828e01610d9d565b97505060808b013567ffffffffffffffff8111156110ba576110b9610c80565b5b6110c68d828e01610d9d565b96505060a08b013567ffffffffffffffff8111156110e7576110e6610c80565b5b6110f38d828e01610d9d565b95505060c06111048d828e01610fcb565b94505060e06111158d828e01610fcb565b9350506101008b013567ffffffffffffffff81111561113757611136610c80565b5b6111438d828e01610d9d565b9250506101206111558d828e01610fcb565b9150509295989b9194979a5092959850565b600081905092915050565b600061117d82610e14565b6111878185611167565b9350611197818560208601610e30565b80840191505092915050565b60006111af8284611172565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061120157607f821691505b602082108103611214576112136111ba565b5b50919050565b7f2f00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611250600183611167565b915061125b8261121a565b600182019050919050565b6000611272828c611172565b915061127d82611243565b9150611289828b611172565b915061129482611243565b91506112a0828a611172565b91506112ab82611243565b91506112b78289611172565b91506112c282611243565b91506112ce8288611172565b91506112d982611243565b91506112e58287611172565b91506112f082611243565b91506112fc8286611172565b915061130782611243565b91506113138285611172565b915061131e82611243565b915061132a8284611172565b91508190509a9950505050505050505050565b6000819050919050565b61135861135382610edc565b61133d565b82525050565b600061136a828c611347565b60208201915061137a828b611172565b9150611386828a611172565b91506113928289611172565b915061139e8288611172565b91506113aa8287611347565b6020820191506113ba8286611347565b6020820191506113ca8285611172565b91506113d68284611347565b6020820191508190509a9950505050505050505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261144f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611412565b6114598683611412565b95508019841693508086168417925050509392505050565b6000819050919050565b600061149661149161148c84610edc565b611471565b610edc565b9050919050565b6000819050919050565b6114b08361147b565b6114c46114bc8261149d565b84845461141f565b825550505050565b600090565b6114d96114cc565b6114e48184846114a7565b505050565b5b81811015611508576114fd6000826114d1565b6001810190506114ea565b5050565b601f82111561154d5761151e816113ed565b61152784611402565b81016020851015611536578190505b61154a61154285611402565b8301826114e9565b50505b505050565b600082821c905092915050565b600061157060001984600802611552565b1980831691505092915050565b6000611589838361155f565b9150826002028217905092915050565b6115a282610e14565b67ffffffffffffffff8111156115bb576115ba610ca0565b5b6115c582546111e9565b6115d082828561150c565b600060209050601f83116001811461160357600084156115f1578287015190505b6115fb858261157d565b865550611663565b601f198416611611866113ed565b60005b8281101561163957848901518255600182019150602085019450602081019050611614565b868310156116565784890151611652601f89168261155f565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006116a582610edc565b91506116b083610edc565b9250826116c0576116bf61166b565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061170582610edc565b915061171083610edc565b9250826117205761171f61166b565b5b828204905092915050565b60006117378284611347565b60208201915081905092915050565b600061175182610edc565b915061175c83610edc565b9250828203905081811115611774576117736116cb565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006117b482610edc565b91506117bf83610edc565b92508282019050808211156117d7576117d66116cb565b5b92915050565b60006117e882610edc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361181a576118196116cb565b5b60018201905091905056fea264697066735822122087c576dd4fac57ebb9aacb26043f56f8b293cd7b25522118fff4144f8778ae4464736f6c63430008120033";

    public static final String FUNC_BEEF = "beef";

    public static final String FUNC_QUERYBEEF = "queryBeef";

    public static final String FUNC_SELLBEEF = "sellBeef";

    @Deprecated
    protected Internal(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit);
    }

    protected Internal(String contractAddress, Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider) {
        super(BINARY, contractAddress, web3j, credentials, contractGasProvider);
    }

    @Deprecated
    protected Internal(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit);
    }

    protected Internal(String contractAddress, Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider);
    }

    public RemoteFunctionCall<Tuple10<BigInteger, String, String, String, String, BigInteger, BigInteger, String, BigInteger, byte[]>> beef(String param0) {
        final Function function = new Function(FUNC_BEEF, 
                Arrays.<Type>asList(new org.web3j.abi.datatypes.Utf8String(param0)), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Uint256>() {}, new TypeReference<Uint256>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Uint256>() {}, new TypeReference<Bytes32>() {}));
        return new RemoteFunctionCall<Tuple10<BigInteger, String, String, String, String, BigInteger, BigInteger, String, BigInteger, byte[]>>(function,
                new Callable<Tuple10<BigInteger, String, String, String, String, BigInteger, BigInteger, String, BigInteger, byte[]>>() {
                    @Override
                    public Tuple10<BigInteger, String, String, String, String, BigInteger, BigInteger, String, BigInteger, byte[]> call() throws Exception {
                        List<Type> results = executeCallMultipleValueReturn(function);
                        return new Tuple10<BigInteger, String, String, String, String, BigInteger, BigInteger, String, BigInteger, byte[]>(
                                (BigInteger) results.get(0).getValue(), 
                                (String) results.get(1).getValue(), 
                                (String) results.get(2).getValue(), 
                                (String) results.get(3).getValue(), 
                                (String) results.get(4).getValue(), 
                                (BigInteger) results.get(5).getValue(), 
                                (BigInteger) results.get(6).getValue(), 
                                (String) results.get(7).getValue(), 
                                (BigInteger) results.get(8).getValue(), 
                                (byte[]) results.get(9).getValue());
                    }
                });
    }

    public RemoteFunctionCall<Tuple2<String, byte[]>> queryBeef(String beef_key) {
        final Function function = new Function(FUNC_QUERYBEEF, 
                Arrays.<Type>asList(new org.web3j.abi.datatypes.Utf8String(beef_key)), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}, new TypeReference<Bytes32>() {}));
        return new RemoteFunctionCall<Tuple2<String, byte[]>>(function,
                new Callable<Tuple2<String, byte[]>>() {
                    @Override
                    public Tuple2<String, byte[]> call() throws Exception {
                        List<Type> results = executeCallMultipleValueReturn(function);
                        return new Tuple2<String, byte[]>(
                                (String) results.get(0).getValue(), 
                                (byte[]) results.get(1).getValue());
                    }
                });
    }

    public RemoteFunctionCall<TransactionReceipt> sellBeef(String beef_key, BigInteger beef_id, String transfer_time, String transfer_place, String transfer_person, String sell_place, BigInteger price, BigInteger weight, String quality_guarantee_time, BigInteger ox_id) {
        final Function function = new Function(
                FUNC_SELLBEEF, 
                Arrays.<Type>asList(new org.web3j.abi.datatypes.Utf8String(beef_key), 
                new org.web3j.abi.datatypes.generated.Uint256(beef_id), 
                new org.web3j.abi.datatypes.Utf8String(transfer_time), 
                new org.web3j.abi.datatypes.Utf8String(transfer_place), 
                new org.web3j.abi.datatypes.Utf8String(transfer_person), 
                new org.web3j.abi.datatypes.Utf8String(sell_place), 
                new org.web3j.abi.datatypes.generated.Uint256(price), 
                new org.web3j.abi.datatypes.generated.Uint256(weight), 
                new org.web3j.abi.datatypes.Utf8String(quality_guarantee_time), 
                new org.web3j.abi.datatypes.generated.Uint256(ox_id)), 
                Collections.<TypeReference<?>>emptyList());
        return executeRemoteCallTransaction(function);
    }

    @Deprecated
    public static Internal load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        return new Internal(contractAddress, web3j, credentials, gasPrice, gasLimit);
    }

    @Deprecated
    public static Internal load(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return new Internal(contractAddress, web3j, transactionManager, gasPrice, gasLimit);
    }

    public static Internal load(String contractAddress, Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider) {
        return new Internal(contractAddress, web3j, credentials, contractGasProvider);
    }

    public static Internal load(String contractAddress, Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        return new Internal(contractAddress, web3j, transactionManager, contractGasProvider);
    }

    public static RemoteCall<Internal> deploy(Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider) {
        return deployRemoteCall(Internal.class, web3j, credentials, contractGasProvider, BINARY, "");
    }

    @Deprecated
    public static RemoteCall<Internal> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        return deployRemoteCall(Internal.class, web3j, credentials, gasPrice, gasLimit, BINARY, "");
    }

    public static RemoteCall<Internal> deploy(Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        return deployRemoteCall(Internal.class, web3j, transactionManager, contractGasProvider, BINARY, "");
    }

    @Deprecated
    public static RemoteCall<Internal> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return deployRemoteCall(Internal.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "");
    }
}
